<?php echo var_dump($registration);?>

<div class="registrations view">
<h2><?php  __('Registration');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Tournament'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($registration['Tournament']['name'], array('controller' => 'tournaments', 'action' => 'view', $registration['Tournament']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Email'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['email']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Church Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['church_name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Coach Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['coach_name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Phone'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['phone']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Number For Lunch'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['number_for_lunch']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Number Of Seats'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['number_of_seats']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Housing Notes'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $registration['Registration']['housing_notes']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit Registration', true), array('action' => 'edit', $registration['Registration']['id'])); ?> </li>
		<li><?php echo $html->link(__('Delete Registration', true), array('action' => 'delete', $registration['Registration']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $registration['Registration']['id'])); ?> </li>
		<li><?php echo $html->link(__('List Registrations', true), array('action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Registration', true), array('action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Tournaments', true), array('controller' => 'tournaments', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Tournament', true), array('controller' => 'tournaments', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Housees', true), array('controller' => 'housees', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Housee', true), array('controller' => 'housees', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Individuals', true), array('controller' => 'individuals', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Individual', true), array('controller' => 'individuals', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Quizmasters', true), array('controller' => 'quizmasters', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Quizmaster', true), array('controller' => 'quizmasters', 'action' => 'add')); ?> </li>
		<li><?php echo $html->link(__('List Teams', true), array('controller' => 'teams', 'action' => 'index')); ?> </li>
		<li><?php echo $html->link(__('New Team', true), array('controller' => 'teams', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Housees');?></h3>
	<?php if (!empty($registration['Housee'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Registration Id'); ?></th>
		<th><?php __('Name'); ?></th>
		<th><?php __('Type'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($registration['Housee'] as $housee):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $housee['id'];?></td>
			<td><?php echo $housee['registration_id'];?></td>
			<td><?php echo $housee['name'];?></td>
			<td><?php echo $housee['type'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller' => 'housees', 'action' => 'view', $housee['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller' => 'housees', 'action' => 'edit', $housee['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller' => 'housees', 'action' => 'delete', $housee['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $housee['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Housee', true), array('controller' => 'housees', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Individuals');?></h3>
	<?php if (!empty($registration['Individual'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Registration Id'); ?></th>
		<th><?php __('Name'); ?></th>
		<th><?php __('Division'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($registration['Individual'] as $individual):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $individual['id'];?></td>
			<td><?php echo $individual['registration_id'];?></td>
			<td><?php echo $individual['name'];?></td>
			<td><?php echo $individual['division'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller' => 'individuals', 'action' => 'view', $individual['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller' => 'individuals', 'action' => 'edit', $individual['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller' => 'individuals', 'action' => 'delete', $individual['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $individual['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Individual', true), array('controller' => 'individuals', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Quizmasters');?></h3>
	<?php if (!empty($registration['Quizmaster'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Registration Id'); ?></th>
		<th><?php __('Name'); ?></th>
		<th><?php __('Can Do STVA'); ?></th>
		<th><?php __('Can Do STVB'); ?></th>
		<th><?php __('Can Do STRA'); ?></th>
		<th><?php __('Can Do STRB'); ?></th>
		<th><?php __('Can Do YTVA'); ?></th>
		<th><?php __('Can Do YTVB'); ?></th>
		<th><?php __('Can Do YTRA'); ?></th>
		<th><?php __('Can Do YTRB'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($registration['Quizmaster'] as $quizmaster):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $quizmaster['id'];?></td>
			<td><?php echo $quizmaster['registration_id'];?></td>
			<td><?php echo $quizmaster['name'];?></td>
			<td><?php echo $quizmaster['can_do_STVA'];?></td>
			<td><?php echo $quizmaster['can_do_STVB'];?></td>
			<td><?php echo $quizmaster['can_do_STRA'];?></td>
			<td><?php echo $quizmaster['can_do_STRB'];?></td>
			<td><?php echo $quizmaster['can_do_YTVA'];?></td>
			<td><?php echo $quizmaster['can_do_YTVB'];?></td>
			<td><?php echo $quizmaster['can_do_YTRA'];?></td>
			<td><?php echo $quizmaster['can_do_YTRB'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller' => 'quizmasters', 'action' => 'view', $quizmaster['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller' => 'quizmasters', 'action' => 'edit', $quizmaster['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller' => 'quizmasters', 'action' => 'delete', $quizmaster['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $quizmaster['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Quizmaster', true), array('controller' => 'quizmasters', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Teams');?></h3>
	<?php if (!empty($registration['Team'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Registration Id'); ?></th>
		<th><?php __('Division'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($registration['Team'] as $team):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $team['id'];?></td>
			<td><?php echo $team['registration_id'];?></td>
			<td><?php echo $team['division'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller' => 'teams', 'action' => 'view', $team['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller' => 'teams', 'action' => 'edit', $team['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller' => 'teams', 'action' => 'delete', $team['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $team['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Team', true), array('controller' => 'teams', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
